//
//  HotSpotsButton.m
//  Behing
//
//  Created by Lj on 2017/11/27.
//  Copyright © 2017年 lj. All rights reserved.
//

#import "HotSpotsButton.h"

@implementation HotSpotsButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
    CGRect bounds = self.bounds;
    CGFloat widthDelta = 44.0 - bounds.size.width;
    CGFloat heightDelta = 44.0 - bounds.size.height;
    bounds = CGRectInset(bounds, - 0.5 * widthDelta, - 0.5 * heightDelta);
    return CGRectContainsPoint(bounds, point);
}

@end
